﻿<UserControl x:Class="Tisbi.LawFirm.UI.Views.Controls.Forms.ClaimsCRUDForm"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mui="http://firstfloorsoftware.com/ModernUI"
             xmlns:bl="clr-namespace:Tisbi.LawFirm.BL;assembly=Tisbi.LawFirm.BL"
             mc:Ignorable="d" 
             d:DesignHeight="500" d:DesignWidth="380">
    <ScrollViewer>
        <StackPanel Orientation="Vertical">
            <StackPanel.Resources>
                <Style TargetType="StackPanel">
                    <Setter Property="Orientation" Value="Horizontal" />
                    <Setter Property="Margin" Value="0,0,0,4" />
                </Style>
            </StackPanel.Resources>
            <StackPanel>
                <Label Content="№:" />
                <TextBox Text="{Binding Path=Model.Id}" IsReadOnly="True" Background="LightGray"/>
            </StackPanel>
            <StackPanel>
                <Label Content="Дата создания:" />
                <TextBox IsReadOnly="True" Background="LightGray" Text="{Binding Path=Model.Created, Mode=TwoWay}" />
            </StackPanel>
            <StackPanel>
                <Label Content="Дата поступления:" />
                <DatePicker>
                    <DatePicker.Text>
                        <Binding Path="SelectedDateOfIncoming" Mode="TwoWay">
                            <Binding.Converter>
                                <bl:DateConverter />
                            </Binding.Converter>
                        </Binding>
                    </DatePicker.Text>
                </DatePicker>
            </StackPanel>
            <StackPanel>
                <Label Content="Кто направил претензию:" />
                <ComboBox ItemsSource="{Binding Path=Creators}"
                                    SelectedItem="{Binding Path=SelectedCreator, Mode=TwoWay}"
                                    DisplayMemberPath="Title" />
                <mui:ModernButton Command="{Binding SelectCreator}" EllipseDiameter="26" HorizontalAlignment="Left" EllipseStrokeThickness="2" IconWidth="14" IconHeight="14" ToolTip="Добавить новое лицо" IconData="{StaticResource AddIconData}" Width="28" />
            </StackPanel>
            <StackPanel>
                <Label Content="Кому:" />
                <ComboBox ItemsSource="{Binding Path=AssingnCustomers}" SelectedItem="{Binding Path=SelectedAssingnCustomers, Mode=TwoWay}" DisplayMemberPath="Title" />
                <mui:ModernButton Command="{Binding SelectAssingnCustomer}" EllipseDiameter="26" HorizontalAlignment="Left" EllipseStrokeThickness="2" IconWidth="14" IconHeight="14" ToolTip="Добавить новое лицо" IconData="{StaticResource AddIconData}" Width="28" />
            </StackPanel>
            <StackPanel>
                <Label Content="Дата отправления:" />
                <DatePicker>
                    <DatePicker.Text>
                        <Binding Path="SelectedDateOfSending" Mode="TwoWay">
                            <Binding.Converter>
                                <bl:DateConverter />
                            </Binding.Converter>
                        </Binding>
                    </DatePicker.Text>
                </DatePicker>
            </StackPanel>
            <StackPanel>
                <Label Content="№ уведомления:" />
                <TextBox Text="{Binding Path=Model.NumberOfNotice, Mode=TwoWay}" />
            </StackPanel>
            <StackPanel>
                <Label Content="Дата вручения:" />
                <DatePicker>
                    <DatePicker.Text>
                        <Binding Path="SelectedDateOfReceip" Mode="TwoWay">
                            <Binding.Converter>
                                <bl:DateConverter />
                            </Binding.Converter>
                        </Binding>
                    </DatePicker.Text>
                </DatePicker>
            </StackPanel>
            <StackPanel>
                <Label Content="Краткая суть:" />
                <TextBox MinLines="6" Text="{Binding Path=Model.ContentRequirements, Mode=TwoWay}" />
            </StackPanel>
            <StackPanel>
                <Label Content="Результат рассмотрения:" />
                <TextBox Text="{Binding Path=Model.ResultOfDecision, Mode=TwoWay}" />
            </StackPanel>
            <StackPanel>
                <Label Content="Дата рассмотрения претензии:" />
                <DatePicker>
                    <DatePicker.Text>
                        <Binding Path="SelectedDateOfDecision" Mode="TwoWay">
                            <Binding.Converter>
                                <bl:DateConverter />
                            </Binding.Converter>
                        </Binding>
                    </DatePicker.Text>
                </DatePicker>
            </StackPanel>
            <StackPanel>
                <Label Content="Сумма претензии:"  />
                <DatePicker Text="{Binding Path=Model.ClaimAmount, Mode=TwoWay}" />
            </StackPanel>
            <StackPanel>
                <Label Content="Комментарий:"  />
                <TextBox MinLines="6" Text="{Binding Path=Model.Comments, Mode=TwoWay}"  />
            </StackPanel>
        </StackPanel>
    </ScrollViewer>
</UserControl>
